3.81 \(\int \sqrt{a+c x^2} (d+e x+f x^2) \, dx\)

Optimal. Leaf size=106 \[ \frac{a (4 c d-a f) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{8 c^{3/2}}+\frac{x \sqrt{a+c x^2} (4 c d-a f)}{8 c}+\frac{e \left (a+c x^2\right )^{3/2}}{3 c}+\frac{f x \left (a+c x^2\right )^{3/2}}{4 c} \]

[Out]

((4*c*d - a*f)*x*Sqrt[a + c*x^2])/(8*c) + (e*(a + c*x^2)^(3/2))/(3*c) + (f*x*(a + c*x^2)^(3/2))/(4*c) + (a*(4*
c*d - a*f)*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(8*c^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.0642928, antiderivative size = 106, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.227, Rules used = {1815, 641, 195, 217, 206} \[ \frac{a (4 c d-a f) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{8 c^{3/2}}+\frac{x \sqrt{a+c x^2} (4 c d-a f)}{8 c}+\frac{e \left (a+c x^2\right )^{3/2}}{3 c}+\frac{f x \left (a+c x^2\right )^{3/2}}{4 c} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + c*x^2]*(d + e*x + f*x^2),x]

[Out]

((4*c*d - a*f)*x*Sqrt[a + c*x^2])/(8*c) + (e*(a + c*x^2)^(3/2))/(3*c) + (f*x*(a + c*x^2)^(3/2))/(4*c) + (a*(4*
c*d - a*f)*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(8*c^(3/2))

Rule 1815

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expon[Pq, x]]}, Si
mp[(e*x^(q - 1)*(a + b*x^2)^(p + 1))/(b*(q + 2*p + 1)), x] + Dist[1/(b*(q + 2*p + 1)), Int[(a + b*x^2)^p*Expan
dToSum[b*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, p}, x]
&& PolyQ[Pq, x] &&  !LeQ[p, -1]

Rule 641

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(e*(a + c*x^2)^(p + 1))/(2*c*(p + 1)),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 195

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^p)/(n*p + 1), x] + Dist[(a*n*p)/(n*p + 1),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \sqrt{a+c x^2} \left (d+e x+f x^2\right ) \, dx &=\frac{f x \left (a+c x^2\right )^{3/2}}{4 c}+\frac{\int (4 c d-a f+4 c e x) \sqrt{a+c x^2} \, dx}{4 c}\\ &=\frac{e \left (a+c x^2\right )^{3/2}}{3 c}+\frac{f x \left (a+c x^2\right )^{3/2}}{4 c}+\frac{(4 c d-a f) \int \sqrt{a+c x^2} \, dx}{4 c}\\ &=\frac{(4 c d-a f) x \sqrt{a+c x^2}}{8 c}+\frac{e \left (a+c x^2\right )^{3/2}}{3 c}+\frac{f x \left (a+c x^2\right )^{3/2}}{4 c}+\frac{(a (4 c d-a f)) \int \frac{1}{\sqrt{a+c x^2}} \, dx}{8 c}\\ &=\frac{(4 c d-a f) x \sqrt{a+c x^2}}{8 c}+\frac{e \left (a+c x^2\right )^{3/2}}{3 c}+\frac{f x \left (a+c x^2\right )^{3/2}}{4 c}+\frac{(a (4 c d-a f)) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{8 c}\\ &=\frac{(4 c d-a f) x \sqrt{a+c x^2}}{8 c}+\frac{e \left (a+c x^2\right )^{3/2}}{3 c}+\frac{f x \left (a+c x^2\right )^{3/2}}{4 c}+\frac{a (4 c d-a f) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{8 c^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.199741, size = 98, normalized size = 0.92 \[ \frac{\sqrt{a+c x^2} \left (\sqrt{c} (a (8 e+3 f x)+2 c x (6 d+x (4 e+3 f x)))-\frac{3 \sqrt{a} (a f-4 c d) \sinh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{\sqrt{\frac{c x^2}{a}+1}}\right )}{24 c^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + c*x^2]*(d + e*x + f*x^2),x]

[Out]

(Sqrt[a + c*x^2]*(Sqrt[c]*(a*(8*e + 3*f*x) + 2*c*x*(6*d + x*(4*e + 3*f*x))) - (3*Sqrt[a]*(-4*c*d + a*f)*ArcSin
h[(Sqrt[c]*x)/Sqrt[a]])/Sqrt[1 + (c*x^2)/a]))/(24*c^(3/2))

________________________________________________________________________________________

Maple [A]  time = 0.05, size = 111, normalized size = 1.1 \begin{align*}{\frac{fx}{4\,c} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}-{\frac{afx}{8\,c}\sqrt{c{x}^{2}+a}}-{\frac{{a}^{2}f}{8}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}+{\frac{e}{3\,c} \left ( c{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{dx}{2}\sqrt{c{x}^{2}+a}}+{\frac{ad}{2}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){\frac{1}{\sqrt{c}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^2+e*x+d)*(c*x^2+a)^(1/2),x)

[Out]

1/4*f*x*(c*x^2+a)^(3/2)/c-1/8*f*a/c*x*(c*x^2+a)^(1/2)-1/8*f*a^2/c^(3/2)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))+1/3*e*(c
*x^2+a)^(3/2)/c+1/2*d*x*(c*x^2+a)^(1/2)+1/2*d*a/c^(1/2)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)*(c*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.35248, size = 448, normalized size = 4.23 \begin{align*} \left [-\frac{3 \,{\left (4 \, a c d - a^{2} f\right )} \sqrt{c} \log \left (-2 \, c x^{2} + 2 \, \sqrt{c x^{2} + a} \sqrt{c} x - a\right ) - 2 \,{\left (6 \, c^{2} f x^{3} + 8 \, c^{2} e x^{2} + 8 \, a c e + 3 \,{\left (4 \, c^{2} d + a c f\right )} x\right )} \sqrt{c x^{2} + a}}{48 \, c^{2}}, -\frac{3 \,{\left (4 \, a c d - a^{2} f\right )} \sqrt{-c} \arctan \left (\frac{\sqrt{-c} x}{\sqrt{c x^{2} + a}}\right ) -{\left (6 \, c^{2} f x^{3} + 8 \, c^{2} e x^{2} + 8 \, a c e + 3 \,{\left (4 \, c^{2} d + a c f\right )} x\right )} \sqrt{c x^{2} + a}}{24 \, c^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)*(c*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[-1/48*(3*(4*a*c*d - a^2*f)*sqrt(c)*log(-2*c*x^2 + 2*sqrt(c*x^2 + a)*sqrt(c)*x - a) - 2*(6*c^2*f*x^3 + 8*c^2*e
*x^2 + 8*a*c*e + 3*(4*c^2*d + a*c*f)*x)*sqrt(c*x^2 + a))/c^2, -1/24*(3*(4*a*c*d - a^2*f)*sqrt(-c)*arctan(sqrt(
-c)*x/sqrt(c*x^2 + a)) - (6*c^2*f*x^3 + 8*c^2*e*x^2 + 8*a*c*e + 3*(4*c^2*d + a*c*f)*x)*sqrt(c*x^2 + a))/c^2]

________________________________________________________________________________________

Sympy [A]  time = 6.02397, size = 170, normalized size = 1.6 \begin{align*} \frac{a^{\frac{3}{2}} f x}{8 c \sqrt{1 + \frac{c x^{2}}{a}}} + \frac{\sqrt{a} d x \sqrt{1 + \frac{c x^{2}}{a}}}{2} + \frac{3 \sqrt{a} f x^{3}}{8 \sqrt{1 + \frac{c x^{2}}{a}}} - \frac{a^{2} f \operatorname{asinh}{\left (\frac{\sqrt{c} x}{\sqrt{a}} \right )}}{8 c^{\frac{3}{2}}} + \frac{a d \operatorname{asinh}{\left (\frac{\sqrt{c} x}{\sqrt{a}} \right )}}{2 \sqrt{c}} + e \left (\begin{cases} \frac{\sqrt{a} x^{2}}{2} & \text{for}\: c = 0 \\\frac{\left (a + c x^{2}\right )^{\frac{3}{2}}}{3 c} & \text{otherwise} \end{cases}\right ) + \frac{c f x^{5}}{4 \sqrt{a} \sqrt{1 + \frac{c x^{2}}{a}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**2+e*x+d)*(c*x**2+a)**(1/2),x)

[Out]

a**(3/2)*f*x/(8*c*sqrt(1 + c*x**2/a)) + sqrt(a)*d*x*sqrt(1 + c*x**2/a)/2 + 3*sqrt(a)*f*x**3/(8*sqrt(1 + c*x**2
/a)) - a**2*f*asinh(sqrt(c)*x/sqrt(a))/(8*c**(3/2)) + a*d*asinh(sqrt(c)*x/sqrt(a))/(2*sqrt(c)) + e*Piecewise((
sqrt(a)*x**2/2, Eq(c, 0)), ((a + c*x**2)**(3/2)/(3*c), True)) + c*f*x**5/(4*sqrt(a)*sqrt(1 + c*x**2/a))

________________________________________________________________________________________

Giac [A]  time = 1.15261, size = 117, normalized size = 1.1 \begin{align*} \frac{1}{24} \, \sqrt{c x^{2} + a}{\left ({\left (2 \,{\left (3 \, f x + 4 \, e\right )} x + \frac{3 \,{\left (4 \, c^{2} d + a c f\right )}}{c^{2}}\right )} x + \frac{8 \, a e}{c}\right )} - \frac{{\left (4 \, a c d - a^{2} f\right )} \log \left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + a} \right |}\right )}{8 \, c^{\frac{3}{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)*(c*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/24*sqrt(c*x^2 + a)*((2*(3*f*x + 4*e)*x + 3*(4*c^2*d + a*c*f)/c^2)*x + 8*a*e/c) - 1/8*(4*a*c*d - a^2*f)*log(a
bs(-sqrt(c)*x + sqrt(c*x^2 + a)))/c^(3/2)